#include <stdio.h>
#include <time.h>
#include "gameData.h"
//#include "SDL.h"
//#include "SDL_ttf.h"
#include "sdl\include\SDL.h"
#include "sdl\include\SDL_ttf.h"

const int SCREEN_W = 800;
const int SCREEN_H = 600;
const int BPP = 32;

int main(int argc, char ** argv)
{
	// initalize SDL and TTF
	SDL_Init(SDL_INIT_EVERYTHING);
	if(TTF_Init()==-1) { return 1;}
	// setup screen
	SDL_Surface * screen = SDL_SetVideoMode(SCREEN_W,SCREEN_H,BPP, SDL_SWSURFACE);
	GameData gd(screen);
	
	while(gd.isRunning()){
		gd.draw();
		gd.handleInput();
		gd.update();
	}

	SDL_FreeSurface(screen); // free the screen
	TTF_Quit();              // quit ttf
	SDL_Quit();              // quit sdl
	return 0;
}